<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
<head>
    <th:block th:include="include :: header('修改费用支出')" />
    <th:block th:include="include :: datetimepicker-css" />
</head>
<body class="white-bg">
    <div class="wrapper wrapper-content animated fadeInRight ibox-content">
        <form class="form-horizontal m" id="form-fCarCost-edit" th:object="${fCarCost}">
            <input name="costId" th:field="*{costId}" type="hidden">
            <div class="form-group">    
                <label class="col-sm-3 control-label">：</label>
                <div class="col-sm-8">
                    <input name="deptId" th:field="*{deptId}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">：</label>
                <div class="col-sm-8">
                    <input name="carId" th:field="*{carId}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">费用类型：</label>
                <div class="col-sm-8">
                    <select name="costType" class="form-control m-b" th:with="type=${@dict.getType('f_zhichu_type')}">
                        <option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}" th:field="*{costType}"></option>
                    </select>
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">费用：</label>
                <div class="col-sm-8">
                    <input name="cost" th:field="*{cost}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">支出时间：</label>
                <div class="col-sm-8">
                    <div class="input-group date">
                        <input name="costTime" th:value="${#dates.format(fCarCost.costTime, 'yyyy-MM-dd')}" class="form-control" placeholder="yyyy-MM-dd" type="text">
                        <span class="input-group-addon"><i class="fa fa-calendar"></i></span>
                    </div>
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">加油量：</label>
                <div class="col-sm-8">
                    <input name="petrol" th:field="*{petrol}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">行驶里程：</label>
                <div class="col-sm-8">
                    <input name="kilometers" th:field="*{kilometers}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">强险生效时间：</label>
                <div class="col-sm-8">
                    <div class="input-group date">
                        <input name="qiangInsureSatrtTime" th:value="${#dates.format(fCarCost.qiangInsureSatrtTime, 'yyyy-MM-dd')}" class="form-control" placeholder="yyyy-MM-dd" type="text">
                        <span class="input-group-addon"><i class="fa fa-calendar"></i></span>
                    </div>
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">强险结束时间：</label>
                <div class="col-sm-8">
                    <div class="input-group date">
                        <input name="qiangInsureEndTime" th:value="${#dates.format(fCarCost.qiangInsureEndTime, 'yyyy-MM-dd')}" class="form-control" placeholder="yyyy-MM-dd" type="text">
                        <span class="input-group-addon"><i class="fa fa-calendar"></i></span>
                    </div>
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">保险公司名称：</label>
                <div class="col-sm-8">
                    <input name="qiangInsureCompany" th:field="*{qiangInsureCompany}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">保费金额：</label>
                <div class="col-sm-8">
                    <input name="qiangCost" th:field="*{qiangCost}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">商业险生效时间：</label>
                <div class="col-sm-8">
                    <div class="input-group date">
                        <input name="shangInsureSatrtTime" th:value="${#dates.format(fCarCost.shangInsureSatrtTime, 'yyyy-MM-dd')}" class="form-control" placeholder="yyyy-MM-dd" type="text">
                        <span class="input-group-addon"><i class="fa fa-calendar"></i></span>
                    </div>
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">商业险结束时间：</label>
                <div class="col-sm-8">
                    <div class="input-group date">
                        <input name="shangInsureEndTime" th:value="${#dates.format(fCarCost.shangInsureEndTime, 'yyyy-MM-dd')}" class="form-control" placeholder="yyyy-MM-dd" type="text">
                        <span class="input-group-addon"><i class="fa fa-calendar"></i></span>
                    </div>
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">保险公司名称：</label>
                <div class="col-sm-8">
                    <input name="shangInsureCompany" th:field="*{shangInsureCompany}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">保费金额：</label>
                <div class="col-sm-8">
                    <input name="shangCost" th:field="*{shangCost}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">备注：</label>
                <div class="col-sm-8">
                    <input name="remark" th:field="*{remark}" class="form-control" type="text">
                </div>
            </div>
        </form>
    </div>
    <th:block th:include="include :: footer" />
    <th:block th:include="include :: datetimepicker-js" />
    <script th:inline="javascript">
        var prefix = ctx + "financial/fCarCost";
        $("#form-fCarCost-edit").validate({
            focusCleanup: true
        });

        function submitHandler() {
            if ($.validate.form()) {
                $.operate.save(prefix + "/edit", $('#form-fCarCost-edit').serialize());
            }
        }

        $("input[name='costTime']").datetimepicker({
            format: "yyyy-mm-dd",
            minView: "month",
            autoclose: true
        });

        $("input[name='qiangInsureSatrtTime']").datetimepicker({
            format: "yyyy-mm-dd",
            minView: "month",
            autoclose: true
        });

        $("input[name='qiangInsureEndTime']").datetimepicker({
            format: "yyyy-mm-dd",
            minView: "month",
            autoclose: true
        });

        $("input[name='shangInsureSatrtTime']").datetimepicker({
            format: "yyyy-mm-dd",
            minView: "month",
            autoclose: true
        });

        $("input[name='shangInsureEndTime']").datetimepicker({
            format: "yyyy-mm-dd",
            minView: "month",
            autoclose: true
        });
    </script>
</body>
</html>